package com.musemun.controller;

import com.musemun.common.CommonResult;
import com.musemun.common.ResultUtil;
import com.musemun.service.function.DataAlaysis;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 文物首页所需模块
 * </p>
 *
 * @author ZWYZY
 * @since 2020/5/17
 */
@RestController
@RequestMapping("/crms/crmsAnalysis")
@Api(tags = "文物仪表盘", description = "文物数据统计(PC)")
@Validated
public class DataAnalysisController {
    @Resource
    public DataAlaysis dataAlaysis;

    @GetMapping("/getData")
    @ApiOperation(value = "获取统计数据", httpMethod = "GET")
    public CommonResult getData() {
        return ResultUtil.success(dataAlaysis.getTotalData());
    }
}
